# This is a Makefile for dtdisplay
# 01-Sep-95	JWP	Molecular Structure Corporation
#
#
# Copyright (C) 2014 Rigaku Americas Corporation
#                    9009 New Trails Drive
#                    The Woodlands, TX, USA  77381
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#    * Redistributions of source code must retain the above copyright
#      notice(s), this list of conditions and the following disclaimer.
#    * Redistributions in binary form must reproduce the above copyright
#      notice(s), this list of conditions and the following disclaimer in the
#      documentation and/or other materials provided with the distribution.
#    * Neither the name of the Rigaku Americas Corporation nor the
#      names of its contributors may be used to endorse or promote products
#      derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL RIGAKU AMERICAS CORPORATION BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#

#
#
# Generated by the ICS builderXcessory (BX).
#
#
# Builder Xcessory Builder Xcessory 3.5.1 .
#
#

CC              = g++
OPTLEV          = -O3
DTREKINCLUDEDIR = ../DTTREK
DTREKOBJDIR     = ../DTTREK
DTREKLIBDIR     = ../DTTREK
INSTALLDIR      = ../../bin_irix
GINCLUDEDIR     = /usr/local/lib/g++-include
C++FLAGS        = $(OPTLEV) -I$(GINCLUDEDIR) -I$(DTREKINCLUDEDIR) -L$(DTREKLIBDIR) -DFUNCPROTO -DXTFUNCPROTO 
###-DUSE_OLD_ERROR_BITS
LIBS            = -ldtrek$(OSTYPE) -lXm -lXt -lX11 -lPW -lm

OFILES = main-cc.o UIComponent.o bxutils-cc.o callbacks-cc.o MainWindow.o \
         CXdisplay.o CXcolormap.o CXrubberband.o CXhelp.o CXcursor.o CXprop.o \
	 CUIom9.o CUIom8.o CUIom2.o CUIimageviewprops.o CUInumberField.o \
	 CUIreflnviewprops.o CUIimagefileSelect.o CUIreflnfileSelect.o \
	 CUIprintSelect.o

FILES = main-cc.cc UIComponent.cc bxutils-cc.cc callbacks-cc.cc MainWindow.cc \
	CXdisplay.cc CXcolormap.cc CXrubberband.cc CXhelp.cc CXcursor.cc \
	CXprop.cc \
	CUIom9.cc CUIom8.cc CUIom2.cc CUIimageviewprops.cc CUInumberField.cc \
	CUIreflnviewprops.cc CUIimagefileSelect.cc CUIreflnfileSelect.cc \
	CUIprintSelect.cc

ALL             = dtdisplay
RM  = rm -f

# User-specified options:

LIBOBJS		= CXdisplay.o CXcolormap.o CXrubberband.o CXhelp.o CXcursor.o \
		  CXprop.o

all: dtdisplay gifs

dtdisplay: $(OFILES)
	$(CC) $(C++FLAGS) $(OFILES) $(LIBS) -o dtdisplay

lib: libdtrekX$(OSTYPE).a

main-cc: $(OFILES)
	$(CC) $(C++FLAGS) $(OFILES) $(LIBS) -o $@

main-cc.o: main-cc.cc
	$(CC) $(C++FLAGS) -c main-cc.cc

jtest:  jtest.o CXprop.o
	$(CC) $^ $(C++FLAGS) $(LIBS)  -o $@ 

jtest.o: jtest.cc
	$(CC) $(C++FLAGS) -c jtest.cc

UIComponent.o: UIComponent.cc
	$(CC) $(C++FLAGS) -c UIComponent.cc

bxutils-cc.o: bxutils-cc.cc
	$(CC) $(C++FLAGS) -c bxutils-cc.cc

callbacks-cc.o: callbacks-cc.cc
	$(CC) $(C++FLAGS) -c callbacks-cc.cc

CUInumberField.o: CUInumberField.cc
	$(CC) $(C++FLAGS) -c CUInumberField.cc

CUIom8.o: CUIom8.cc
	$(CC) $(C++FLAGS) -c CUIom8.cc

CUIom2.o: CUIom2.cc
	$(CC) $(C++FLAGS) -c CUIom2.cc

CUIom9.o: CUIom9.cc
	$(CC) $(C++FLAGS) -c CUIom9.cc

CUIprintSelect.o: CUIprintSelect.cc
	$(CC) $(C++FLAGS) -c CUIprintSelect.cc

CUIimageviewprops.o: CUIimageviewprops.cc
	$(CC) $(C++FLAGS) -c CUIimageviewprops.cc

CUIimagefileSelect.o: CUIimagefileSelect.cc
	$(CC) $(C++FLAGS) -c CUIimagefileSelect.cc

CUIreflnviewprops.o: CUIreflnviewprops.cc
	$(CC) $(C++FLAGS) -c CUIreflnviewprops.cc

CUIreflnfileSelect.o: CUIreflnfileSelect.cc CUIreflnfileSelect.h
	$(CC) $(C++FLAGS) -c CUIreflnfileSelect.cc

MainWindow.o: MainWindow.cc MainWindow.h CXdisplay.h \
		CXcolormap.h CXrubberband.h CXhelp.h
	$(CC) $(C++FLAGS) -c MainWindow.cc

CXdisplay.o: CXdisplay.cc CXdisplay.h CXcolormap.h CXrubberband.h 
	$(CC) $(C++FLAGS) -c CXdisplay.cc

CXcolormap.o: CXcolormap.cc CXcolormap.h $(DTREKINCLUDEDIR)/Cstring.h
	$(CC) $(C++FLAGS) -c CXcolormap.cc

CXrubberband.o: CXrubberband.cc CXrubberband.h
	$(CC) $(C++FLAGS) -c CXrubberband.cc

CXhelp.o:	 CXhelp.cc CXhelp.h
	$(CC) $(C++FLAGS) -c CXhelp.cc

CXprop.o:	 CXprop.cc CXprop.h
	$(CC) $(C++FLAGS) -c CXprop.cc

CXcursor.o:	 CXcursor.cc CXcursor.h
	$(CC) $(C++FLAGS) -c CXcursor.cc

libdtrekX$(OSTYPE).a:	$(LIBOBJS)
		$(AR) -rv $@ $^

EditImageView.gif:	EditImageView.UU	
	uudecode $^

EditReflnView.gif:	EditReflnView.UU
	uudecode $^

Example.gif:		Example.UU
	uudecode $^

FileTemplate.gif:	FileTemplate.UU
	uudecode $^

ColorScale.gif:		ColorScale.UU
	uudecode $^

gifs:	EditImageView.gif EditReflnView.gif Example.gif FileTemplate.gif \
	ColorScale.UU

ocodecenter:: 
	#load $(C++FLAGS) $(OFILES) $(LIBS)

codecenter:: 
	#load $(C++FLAGS) $(CFILES) $(LIBS)

#clean::
#	$(RM) $(OFILES) main-cc

install:	$(ALL)
		if [ ! -d $(INSTALLDIR) ];then mkdir $(INSTALLDIR);fi;
		for X in $(ALL); do \
			cp $$X $(INSTALLDIR); done

clean:
		$(RM) $(OFILES) *$(OSTYPE).a $(ALL)

cleanbin:
		$(RM) dtdisplay MainWindow.o


